<style>
     .layui-layer .layui-layer-iframe .layui-layer-border .layui-layer-fast{
        width:1000px;!important;
    }
</style>
<div class="panel-body" style="width:100%;">
    <form id="send-form" class="form-horizontal" role="send" data-toggle="validator" method="POST" action="">
        <div class="tab-pane" id="min" >
            <div class="row">
                <div class="form-group" style="display:flex; align-items:center; ">
                    <div class="col-xs-4">
                        <textarea class="form-control" id="code" data-toggle="tooltip" style="height:400px; width: 200px;" name="row[code]" placeholder="请输入序列号"></textarea>
                    </div>
                    <div class="form-group">
                        <div class="col-xs-12">
                            {:Form::cxselect('ajax/area', ['province','city','area'], ['province'=>'0', 'city'=>'','area'=>''])}
                        </div>
                        <label style="text-align: left" for="c-agent_name" class="control-label col-xs-12 col-sm-3">*代理商:</label>
                        <div class="col-xs-12">
                            <input style="width:280px;" id="c-agent_name"  name="row[nameAgent]"  data-rule="required"  data-source="/api/base/getAgent" data-primary-key="agent_name" data-field="agent_name"   class="form-control selectpage"  type="text" value="">
                        </div>
                    </div>


                </div>
            </div>

        </div>

        <div class="form-group layer-footer">
            <label class="control-label col-xs-12 col-sm-2"></label>
            <div class="col-xs-12 col-sm-8">
                <button type="submit" class="btn btn-success btn-embossed disabled">发货</button>
                <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
                <span id="count"></span>
            </div>

        </div>
    </form>
</div>
<script type="text/javascript" src="/public/assets/js/jquery-2.1.0.js"></script>
<script type="text/javascript">
    document.onkeydown=function(event){
        var e = event || window.event || arguments.callee.caller.arguments[0];
        if(e && e.keyCode==13){
            // enter 键
            var lines = $('#code').val().split(/\n/);
            var counts = lines.length;
            document.getElementById("count").innerText = counts+"个";
            console.log(count);
        }
    };
</script>

